package com.mt.api.modules.manager;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.mt.api.modules.domain.AppOrder;
import com.mt.api.modules.domain.bo.AppOrderListBo;
import com.mt.api.modules.domain.dto.*;

import java.util.Date;
import java.util.List;

/**
 * @Author: plover
 * @Date: 2022-01-02
 * @Description:
 */
public interface IOrderManager extends IService<AppOrder> {

    Page<AppOrder> getOrderPage(AppOrderListBo appOrderListBo);

    List<OrderCustomerCountDto> getOrderCustomerCount(Integer lastDayNum);

    List<OrderCargoCountDto> getOrderCargoCount(Integer lastDayNum);

    List<AppOrder> getOrderByDate(List<Integer> statusList, String date);

    /**
     * 获取客户最新的一条订单
     *
     * @param customerId
     * @return
     */
    AppOrder getLastOrderByCustomerId(Integer customerId);

    int plusOutStoreQty(Integer id, Integer outStoreQty, Integer status, Date finishTime);

    int subtractOutStoreQty(Integer id, Integer outStoreQty, Integer status);

}
